/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse } from '../models/BaseResponse';
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
import type { BaseResponse_SumCommentsVO_ } from '../models/BaseResponse_SumCommentsVO_';
import type { BaseResponse_SumShowCommentsVO_ } from '../models/BaseResponse_SumShowCommentsVO_';
import type { CommentAddRequest } from '../models/CommentAddRequest';
import type { CommentDelRequest } from '../models/CommentDelRequest';
import type { CommentRequest } from '../models/CommentRequest';
import type { LikeChangResquest } from '../models/LikeChangResquest';
import type { MyCommentRequest } from '../models/MyCommentRequest';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class CommentControllerService {

    /**
     * addComment
     * @param authorization Authorization
     * @param commentAddRequest commentAddRequest
     * @returns BaseResponse OK
     * @returns any Created
     * @throws ApiError
     */
    public static addCommentUsingPost(
authorization: string,
commentAddRequest: CommentAddRequest,
): CancelablePromise<BaseResponse | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/comment/addComment',
            headers: {
                'Authorization': authorization,
            },
            body: commentAddRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * deleteComment
     * @param commentDelRequest commentDelRequest
     * @returns BaseResponse_boolean_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static deleteCommentUsingPost(
commentDelRequest: CommentDelRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/comment/deleteComment',
            body: commentDelRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * likeChange
     * @param authorization Authorization
     * @param likeChangResquest likeChangResquest
     * @returns BaseResponse_boolean_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static likeChangeUsingPost(
authorization: string,
likeChangResquest: LikeChangResquest,
): CancelablePromise<BaseResponse_boolean_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/comment/likeChange',
            headers: {
                'Authorization': authorization,
            },
            body: likeChangResquest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * showComments
     * @param authorization Authorization
     * @param commentRequest commentRequest
     * @returns BaseResponse_SumShowCommentsVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static showCommentsUsingPost(
authorization: string,
commentRequest: CommentRequest,
): CancelablePromise<BaseResponse_SumShowCommentsVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/comment/showComments',
            headers: {
                'Authorization': authorization,
            },
            body: commentRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * showMyComments
     * @param authorization Authorization
     * @param myCommentRequest myCommentRequest
     * @returns BaseResponse_SumCommentsVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static showMyCommentsUsingPost(
authorization: string,
myCommentRequest: MyCommentRequest,
): CancelablePromise<BaseResponse_SumCommentsVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/user/comment/showMyComments',
            headers: {
                'Authorization': authorization,
            },
            body: myCommentRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

}
